module.exports = {
  publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  // eslint-loader 是否在保存的时候检查
  lintOnSave: true,
  // use the full build with in-browser compiler?
  // https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only
  runtimeCompiler: true,
  // webpack配置
  // see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
  configureWebpack: {
    externals: {
      AMap: 'AMap'
    }
  },
  // 生产环境是否生成 sourceMap 文件
  productionSourceMap: false,
  // webpack-dev-server 相关配置
  devServer: {
    proxy: {
      '/api': {
        // target: 'http://10.6.13.115:6082',
        // target: 'https://zhsq.unismartcity.com:8070',
        target: 'https://10.9.103.101:8091',
        // target: 'http://3074820ni3.zicp.vip:47642',
        changeOrigin: true,
        pathRewrite: {
          '^/api': '/epsvt/api'
        }
      }
    }
  }
}
